package com.chixing.controller;


import com.chixing.commons.ServerResponse;
import com.chixing.service.IFlowService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.servlet.ModelAndView;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author xiaotao
 * @since 2022-10-19
 */
@RestController
@RequestMapping("/flow")
public class FlowController {
    @Autowired
    private IFlowService flowService;
    @GetMapping("getFlow")
    public ModelAndView getFlow(String traceNo){
        //System.out.println(traceNo);
        ServerResponse flow = flowService.getFlow(traceNo);
        ModelAndView mav = new ModelAndView();
        mav.addObject("flow",flow);
        mav.setViewName("/pay_order/flow.jsp");
        return mav;
    }
}
